<?php
//by willson 105328468@qq.com 2014/10/11
//index page interface

class server_model extends base_model {

	public function __construct() {
		parent::__construct();
	}

	public function type_name($type_id) {
		$name = '';
		switch ($type_id) {
			case 1:$name = '常见问题';break;
			case 2:$name = '视频教程';break;
			case 3:$name = '用户手册';break;
		}
		return $name;
	}

	public function category_name($category_id) {
		$sql = "SELECT name FROM {$this->tbp}goods_category WHERE id='{$category_id}'";
		$row = $this->db->get_row($sql);
		return $row->name;
	}
}
